package com.ym.medical.domain.param;


import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.CouponEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@Data
@ApiModel(value = "优惠劵")
public class CouponEditParam  extends BeanCovert<CouponEntity> implements Serializable {
    @ApiModelProperty(notes = "")
    @NotNull(message="不能为空!",groups = {Update.class})
    private Long id;

    @ApiModelProperty(notes = "优惠劵名称")
    @Size(max = 30 , message = "优惠劵名称长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String couponName;

    @ApiModelProperty(notes = "01满减券02折扣券03兑换券")
    @NotNull(message="01满减券02折扣券03兑换券不能为空!",groups = {Add.class})
    @Size(max = 2 , message = "01满减券02折扣券03兑换券长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String theType;

    @ApiModelProperty(notes = "折扣比例")
    private BigDecimal discount;

    @ApiModelProperty(notes = "0表示无门槛")
    private BigDecimal fullLimit;

    @ApiModelProperty(notes = "满额减扣金额")
    private BigDecimal fullMoney;

    @ApiModelProperty(notes = "折扣上限金额，0表示无上限")
    private BigDecimal discountMoney;

    @ApiModelProperty(notes = "01图文问诊02电话问诊03视频问诊")
    @NotNull(message="01图文问诊02电话问诊03视频问诊不能为空!",groups = {Add.class})
    @Size(max = 2 , message = "01图文问诊02电话问诊03视频问诊长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String toSb;

    @ApiModelProperty(notes = "01固定时间02领取x天失效")
    @NotNull(message="01固定时间02领取x天失效不能为空!",groups = {Add.class})
    @Size(max = 2 , message = "01固定时间02领取x天失效长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String validModel;

    @ApiModelProperty(notes = "有效开始时间")
    @NotNull(message="有效开始时间不能为空!",groups = {Add.class})
    private Date startTime;

    @ApiModelProperty(notes = "有效结束时间")
    @NotNull(message="有效结束时间不能为空!",groups = {Add.class})
    private Date endTime;

    @ApiModelProperty(notes = "有效天数，0表示无限")
    @Max(value=2147483647,message="有效天数，0表示无限最大值不能高于{value}",groups = {Add.class,Update.class})
    @Min(value=-2147483648,message="有效天数，0表示无限最小值不能低于{value}",groups = {Add.class,Update.class})
    private Integer validDay;

    @ApiModelProperty(notes = "发放数量限制,0表示无限制")
    @Max(value=2147483647,message="发放数量限制,0表示无限制最大值不能高于{value}",groups = {Add.class,Update.class})
    @Min(value=-2147483648,message="发放数量限制,0表示无限制最小值不能低于{value}",groups = {Add.class,Update.class})
    private Integer numLimit;

    @ApiModelProperty(notes = "发放递减字段")
    @NotNull(message="发放递减字段不能为空!",groups = {Add.class})
    @Max(value=2147483647,message="发放递减字段最大值不能高于{value}",groups = {Add.class,Update.class})
    @Min(value=-2147483648,message="发放递减字段最小值不能低于{value}",groups = {Add.class,Update.class})
    private Integer decNumLimit;

    @ApiModelProperty(notes = "系统优惠劵00否01是")
    @NotNull(message="系统优惠劵00否01是不能为空!",groups = {Add.class})
    @Size(max = 2 , message = "系统优惠劵00否01是长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String isSys;

    @ApiModelProperty(notes = "发布状态(01-待发布；02-已发布)")
    @Size(max = 2 , message = "发布状态(01-待发布；02-已发布)长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String pubState;

    @ApiModelProperty(notes = "购买方式(金币)")
    private BigDecimal buyGold;

    @ApiModelProperty(notes = "创建人")
    @NotNull(message="创建人不能为空!",groups = {Add.class})
    private Long createPerson;

    @ApiModelProperty(notes = "创建时间")
    @NotNull(message="创建时间不能为空!",groups = {Add.class})
    private Date createTime;

    @ApiModelProperty(notes = "购买方式(现金)")
    private BigDecimal buyCash;

    @ApiModelProperty(notes = "01满减券02折扣券03兑换券")
    private String theTypeName;

    @ApiModelProperty(notes = "01图文问诊02电话问诊03视频问诊")
    private String toSbName;

    @ApiModelProperty(notes = "01固定时间02领取x天失效")
    private String validModelName;

    @ApiModelProperty(notes = "系统优惠劵00否01是")
    private String isSysName;

    @ApiModelProperty(notes = "发布状态(01-待发布；02-已发布)")
    private String pubStateName;

    @ApiModelProperty(notes = "折扣")
    private String discountName;

    public interface Add {
    
    }

    public interface Update {
    
    }

}